<ul class="list-unstyled">
  {volist name="$reply_paginate->all()" id="reply"}
    <?php if($key>0){ echo('<hr>'); } ?>
    <li class=" media" name="reply{$reply->id}" id="reply{$reply->id}">
      <div class="media-left">
        <a href="{:url('user/read', ['id' => $reply->user_id])}">
          <img class="media-object img-thumbnail mr-3" alt="{$reply->user->name}" src="{$reply->user->avatar}" style="width:48px;height:48px;" />
        </a>
      </div>

      <div class="media-body">
        <div class="media-heading mt-0 mb-1 text-secondary">
          <a href="{:url('user/read', ['id' => $reply->user_id])}" title="{$reply->user->name}">
            {$reply->user->name}
          </a>
          <span class="text-secondary"> • </span>
          <span class="meta text-secondary">{$reply->create_time}</span>

          <!-- 回复删除按钮 -->
          <span class="meta float-right ">
            {if($reply->canDelete($current_user))}
              <form class="delete-reply" action="{:url('reply/delete', ['id' => $reply->id])}"
                onsubmit="return confirm('确定要删除此评论？');"
                method="post">
                {:token()}
                <input type="hidden" name="_method" value="DELETE">
                <button type="submit" class="btn btn-default btn-xs pull-left text-secondary">
                  <i class="far fa-trash-alt"></i>
                </button>
              </form>
            {/if}
          </span>
        </div>
        <div class="reply-content text-secondary">
          {$reply->content}
        </div>
      </div>
    </li>
  {/volist}
</ul>
 <!-- 分页 -->
<div class="mt-5">
    <?php echo($reply_paginate->render()); ?>
</div>